package cn.gson.fengboot.model.pojos;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;

@Entity
public class Lkefu {
    private int id;//客户服务id
    private String kfZhuti;//服务主题
    private Date kfKaishitime;//客户服务开始日期
    private String kfHuafeitime;//客户服务花费时间
    private String kfLeixing;//客户服务类型
    private String kfFangshi;//客户服务方式
    private String kfZhixingren;//客户服务执行人
    private String kfNeirong;//客户服务内容
    private String kfFankui;//客户服务反馈
    private String kfZhuangtai;//客户服务状态
    private String kfBeizhu;//客户服务备注
    private String kfZt;//客户状态
    private TfyclientForm clientId; //服务的客户

    //一个客户有多个投诉，多对一
    @ManyToOne
    @JoinColumn(name = "client_id")
    public TfyclientForm getClientId() {
        return clientId;
    }

    public void setClientId(TfyclientForm clientId) {
        this.clientId = clientId;
    }


    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "kf_zhuti")
    public String getKfZhuti() {
        return kfZhuti;
    }

    public void setKfZhuti(String kfZhuti) {
        this.kfZhuti = kfZhuti;
    }


    @Basic
    @Column(name = "kf_kaishitime")
    public Date getKfKaishitime() {
        return kfKaishitime;
    }

    public void setKfKaishitime(Date kfKaishitime) {
        this.kfKaishitime = kfKaishitime;
    }

    @Basic
    @Column(name = "kf_huafeitime")
    public String getKfHuafeitime() {
        return kfHuafeitime;
    }

    public void setKfHuafeitime(String kfHuafeitime) {
        this.kfHuafeitime = kfHuafeitime;
    }

    @Basic
    @Column(name = "kf_leixing")
    public String getKfLeixing() {
        return kfLeixing;
    }

    public void setKfLeixing(String kfLeixing) {
        this.kfLeixing = kfLeixing;
    }

    @Basic
    @Column(name = "kf_fangshi")
    public String getKfFangshi() {
        return kfFangshi;
    }

    public void setKfFangshi(String kfFangshi) {
        this.kfFangshi = kfFangshi;
    }

    @Basic
    @Column(name = "kf_zhixingren")
    public String getKfZhixingren() {
        return kfZhixingren;
    }

    public void setKfZhixingren(String kfZhixingren) {
        this.kfZhixingren = kfZhixingren;
    }

    @Basic
    @Column(name = "kf_neirong")
    public String getKfNeirong() {
        return kfNeirong;
    }

    public void setKfNeirong(String kfNeirong) {
        this.kfNeirong = kfNeirong;
    }

    @Basic
    @Column(name = "kf_fankui")
    public String getKfFankui() {
        return kfFankui;
    }

    public void setKfFankui(String kfFankui) {
        this.kfFankui = kfFankui;
    }

    @Basic
    @Column(name = "kf_zhuangtai")
    public String getKfZhuangtai() {
        return kfZhuangtai;
    }

    public void setKfZhuangtai(String kfZhuangtai) {
        this.kfZhuangtai = kfZhuangtai;
    }

    @Basic
    @Column(name = "kf_beizhu")
    public String getKfBeizhu() {
        return kfBeizhu;
    }

    public void setKfBeizhu(String kfBeizhu) {
        this.kfBeizhu = kfBeizhu;
    }

    @Basic
    @Column(name = "kf_zt")
    public String getKfZt() {
        return kfZt;
    }

    public void setKfZt(String kfZt) {
        this.kfZt = kfZt;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Lkefu lkefu = (Lkefu) o;
        return id == lkefu.id &&
                Objects.equals(clientId, lkefu.clientId) &&
                Objects.equals(kfZhuti, lkefu.kfZhuti) &&
                Objects.equals(kfKaishitime, lkefu.kfKaishitime) &&
                Objects.equals(kfHuafeitime, lkefu.kfHuafeitime) &&
                Objects.equals(kfLeixing, lkefu.kfLeixing) &&
                Objects.equals(kfFangshi, lkefu.kfFangshi) &&
                Objects.equals(kfZhixingren, lkefu.kfZhixingren) &&
                Objects.equals(kfNeirong, lkefu.kfNeirong) &&
                Objects.equals(kfFankui, lkefu.kfFankui) &&
                Objects.equals(kfZhuangtai, lkefu.kfZhuangtai) &&
                Objects.equals(kfBeizhu, lkefu.kfBeizhu) &&
                Objects.equals(kfZt, lkefu.kfZt) ;
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, clientId, kfZhuti, kfKaishitime, kfHuafeitime, kfLeixing, kfFangshi, kfZhixingren, kfNeirong, kfFankui, kfZhuangtai, kfBeizhu,kfZt);
    }

    @Override
    public String toString() {
        return "Lkefu{" +
                "id=" + id +
                ", kfZhuti='" + kfZhuti + '\'' +
                ", kfKaishitime=" + kfKaishitime +
                ", kfHuafeitime=" + kfHuafeitime +
                ", kfLeixing='" + kfLeixing + '\'' +
                ", kfFangshi='" + kfFangshi + '\'' +
                ", kfZhixingren='" + kfZhixingren + '\'' +
                ", kfNeirong='" + kfNeirong + '\'' +
                ", kfFankui='" + kfFankui + '\'' +
                ", kfZhuangtai='" + kfZhuangtai + '\'' +
                ", kfBeizhu='" + kfBeizhu + '\'' +
                ", kfZt='" + kfZt + '\'' +
                ", clientId=" + clientId +
                '}';
    }
}
